package org.skywork.top.core.db.config.base;

import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;

/**
 * 基础业务接口
 */
public interface BaseService<T> extends IService<T> {

	/**
	 * 逻辑删除
	 *
	 * @param ids id集合(逗号分隔)
	 * @return boolean
	 */
	boolean deleteLogic(List<Long> ids);

	/**
	 * 判断字段是否重复
	 *
	 * @param field      字段
	 * @param value      字段值
	 * @param excludedId 排除的id
	 * @return boolean
	 */
	boolean isFieldDuplicate(SFunction<T, ?> field, Object value, Long excludedId);

}
